
int SUM(const char *str)
{
	int sum = 0;
	register int i = 0;
	for(i = 0; str[i] != '\0'; i++)
	{
		if(str[i] >= '0' && str[i] <= '9')
		{
			int j = i+1;
			if(str[j] >= '0' && str[j] <= '9')
			{
				int t = 0;
				while(str[j] >= '0' && str[j] <= '9')
				{	
					t++;
					j++;
				}
				sum += (str[i] - '0') * pow(10,t);
			}
			else	
				sum += str[i] - '0';
		}
	}
	return sum;
}

void delchar(char *str)
{
	register int i = 0,j = 0,t = 0;
	for(i = 0; str[i] != '\0'; i++)
	{
		for(j = t = i+1;str[j] != '\0'; j++)
		{
			if(str[i] != str[j])
			{
				str[t++] = str[j];
			}
		}
		str[t] = '\0';
	}
}
